<?php

class Person {
    public $name;
    public $sex;
    public $age;

    public function __construct($name, $sex, $age) {
        $this->name = $name;
        $this->sex = $sex;
        $this->age = $age;
    }
    public function say() {
        echo 'i am ' . $this->name;
    }

    public function sing() {
        echo 'i sing ' . $this->name;
    }

}

$person = new Person('wowo', 1, 28);
$person->say();

echo "\n";

$reflect = new ReflectionObject($person);
$properties = $reflect->getProperties();
foreach ($properties as $pro) {
    echo $pro;
}
$methods = $reflect->getMethods();
foreach ($methods as $method) {
    echo $method;
}
var_dump(get_class($person));
var_dump(get_object_vars($person));
var_dump(get_class_vars(get_class($person)));
var_dump(get_class_methods(get_class($person)));
